var webpack = require('webpack');
var path = require("path");
var ip = '192.168.88.45';
var httpport = '8000';
var httpsport = '8888';
module.exports = {
    devServer:{
        hot:true,
        inline:true,
        port:5000
    },
    entry: {
        'main':[
            'webpack-dev-server/client?http://localhost:5000', // WebpackDevServer host and port
            'webpack/hot/only-dev-server',
            path.resolve(__dirname, 'static/entry.js')
        ] //演示单入口文件
    },
    output: {
        publicPath: "http://localhost:5000/build/",
        path: path.resolve(__dirname, "build"),
        filename: "bundle.js"
    },
    module: {
        loaders: [
            { test: /\.css$/, loader: "style-loader!css-loader" },
            { test: /\.js?$/, loader: "babel-loader",
                exclude: /node_modules/,
                query: {
                    presets: ['es2015']
                }
            },
            { test: /\.less$/, loader: "style-loader!css-loader!less-loader" },
            { test: /\.(png|jpg)$/, loader: "url?limit=25000" }
        ]
    },
    plugins: [
        new webpack.DefinePlugin({
            'process.env.NODE.ENV':"development"
        }),
        new webpack.HotModuleReplacementPlugin()
    ]
};